<div class="">
    <div class="admin_nrtop">
        <div class="couriercompanycz">
            <div class="nui-toolbar-item">
                <div class="nui-btn ">
                    <a class="nui-btn-text" href="/admini/express/index"><span>&lt;&lt;</span>返回</a>
                </div>
            </div>                    
            <div class="nui-toolbar-item">
                <div class="nui-btn ">
                    <a class="nui-btn-text" href="/admini/express/addexpress/id/<?php echo $this->expressItem->Id;?>">编辑</a>
                </div>
                <div class="nui-btn ">
                    <?php if($this->expressItem->IsDisable == 1){?>
                        <a href="javascript:void(0)" name="<?php echo $this->expressItem->id;?>" class="nui-btn-text EnableOrDisable" i="启用">启用</a>
                    <?php } else { ?>
                        <a href="javascript:void(0)" name="<?php echo $this->expressItem->id;?>" class="nui-btn-text EnableOrDisable" i="禁用">禁用</a>
                    <?php } ?>
                </div>
                <div class="nui-btn ">
                    <!-- <a class="nui-btn-text" href="#">删除</a> -->
                </div>
            </div>
        </div>
    </div>
    <div class="addbox">
      <div class="addtop">
            <h1><?php echo $this->expressItem->Name; ?></h1>
        </div>
        <div class="addtable">
            <table>
                <tbody>
                    <tr>
                      <td class="addl">快递名称：</td>
                        <td><?php echo $this->expressItem->Name; ?></td>
                    </tr>
                    <tr>
                      <td class="addl">是否按体积：</td>
                        <td><?php echo $this->expressItem->VolumeName; ?></td>
                    </tr>
                    <tr>
                        <td class="addl">可走敏感项：</td>
                        <td>
                            <div class="ccmingan">
                                <?php echo $this->expressItem->ItemTypeName; ?>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="addl">运输时间：</td>
                        <td><?php echo $this->expressItem->Es_time ? $this->expressItem->Es_time.'工作日' : '未填写';?></td>
                    </tr>
                    <tr>
                        <td class="addl">是否要发票：</td>
                        <td><?php echo $this->expressItem->InvoiceName; ?></td>
                    </tr>
                    <tr>
                        <td class="addl">快递logo：</td>
                        <td>
                            <div class="addfile">
                                <div style="display:" class="kdlogo">
                                    <?php if($this->expressItem->logo){ ?>
                                        <img  src="<?php echo $this->expressItem->logo; ?>" height="60px" width="120px" />
                                    <?php }else{ ?>
                                        无logo图
                                    <?php } ?>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td class="addl">燃油费：</td>
                        <td><?php echo (float)$this->expressItem->fuelSurcharge > 0 ? ((float)$this->expressItem->fuelSurcharge) * 100 .'%' : '无' ;?></td>
                    </tr>
                    <tr>
                        <td class="addl">偏远费：</td>
                        <td><?php echo $this->expressItem->isRemoteFee == 1 && (float)$this->expressItem->remoteFee > 0 ? '燃油费 + ' . (float)$this->expressItem->remoteFee : '无'; ?></td>
                    </tr>
                    <tr>
                        <td class="addl">其他费用：</td>
                        <td><?php echo (float)$this->expressItem->othersFee > 0 ? (float)$this->expressItem->othersFee : '无'; ?></td>
                    </tr>
                    <tr>
                        <td class="addl">跟踪所属：</td>
                        <td><?php echo $this->expressItem->trackType; ?></td>
                    </tr>
                    <tr>
                        <td class="addl">官网地址：</td>
                        <td><?php echo $this->expressItem->WebUrl?$this->expressItem->WebUrl:"暂无"; ?></td>
                    </tr>
                    <tr>
                        <td class="addl">官网追踪地址：</td>
                        <td><?php echo $this->expressItem->TrackUrl?$this->expressItem->TrackUrl:"暂无"; ?></td>
                    </tr>
                    <tr>
                        <td class="addl">快递介绍地址：</td>
                        <td><?php echo $this->expressItem->HelpUrl?$this->expressItem->HelpUrl:"暂无"; ?></td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="addbar">
        <div class="nui-toolbar-item">
            <div class="nui-btn ">
                <a class="nui-btn-text" href="/admini/express/index"><span>&lt;&lt;</span>返回</a>
            </div>
        </div>                    
        <div class="nui-toolbar-item">
            <div class="nui-btn ">
                <a class="nui-btn-text" href="/admini/express/addexpress/id/<?php echo $this->expressItem->Id;?>">编辑</a>
            </div>
            <div class="nui-btn ">
                <?php if($this->expressItem->IsDisable == 1){?>
                    <a href="javascript:void(0)" name="<?php echo $this->expressItem->id;?>" class="nui-btn-text EnableOrDisable" i="启用">启用</a>
                <?php } else { ?>
                    <a href="javascript:void(0)" name="<?php echo $this->expressItem->id;?>" class="nui-btn-text EnableOrDisable" i="禁用">禁用</a>
                <?php } ?>
            </div>
            <div class="nui-btn ">
                <!-- <a class="nui-btn-text" href="#">删除</a> -->
            </div>
        </div>  
    </div>
</div>
<script type="text/javascript">
    $(function(){
        //禁用或启用
        $(".EnableOrDisable").click(function(){
            var id = $(this).attr('name');
            var i  = $(this).attr("i");
            if(confirm("您确定"+i+"该快递？","提示信息")){
                $.ajax({    
                    type: 'POST',
                    url: '/admini/express/enableordisable/id/'+id,
                    success: function(data) {
                        if(data == 1){
                            alert(i+"成功！");
                            location.reload();
                        }else{
                            alert("发生未知错误，请重新操作");
                        }
                    }
                });
            }
        });
    })
</script>